package com.vrv.app.cyberspace.common.task;

import com.vrv.app.cyberspace.modules.sys.service.IDailyReportService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Author：LJ
 * @Description：每日零报告任务定时器
 * @Date: 2018/1/19
 * @Modified By:
 */
@Component
@Configurable
@EnableScheduling
public class DailyReportTask {

    private Logger log = Logger.getLogger(DailyReportTask.class);

    @Autowired
    private IDailyReportService dailyReportService;

    //每1分钟执行一次
    @Scheduled(cron = "0 0/30 * * * MON-FRI")
    public void reportCurrentByCron() {
        log.info("******每日零报告开始****");
        dailyReportService.timedDailyReport();
        log.info("******每日零报告结束****");
    }

}
